﻿<ResourceDictionary 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows" 
  xmlns:writer="clr-namespace:OpenFrameworkWriter.Controls"
  >
    <!-- ControlContainer 기본 디자인 -->
    <!--<Style TargetType="writer:ControlEditContainer">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="writer:ControlEditContainer">
                    <Grid x:Name="RootElement" Background="Beige">
                        <Canvas x:Name="ControlHost"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>-->

    <Style TargetType="writer:AreaSelectControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="writer:AreaSelectControl">
                    <Grid x:Name="RootElement">
                        <Grid.Resources>
                            <Style x:Key="LineBaseStyle" TargetType="Line">
                                <Setter Property="StrokeThickness" Value="2"/>
                                <Setter Property="Stroke" Value="Red"/>
                            </Style>
                            
                            <Style x:Key="TopLineStyle" TargetType="Line" BasedOn="{StaticResource LineBaseStyle}"/>
                            <Style x:Key="BottomLineStyle" TargetType="Line" BasedOn="{StaticResource LineBaseStyle}"/>
                            <Style x:Key="LeftLineStyle" TargetType="Line" BasedOn="{StaticResource LineBaseStyle}"/>
                            <Style x:Key="RightLineStyle" TargetType="Line" BasedOn="{StaticResource LineBaseStyle}"/>
                        </Grid.Resources>
                        
                        <Rectangle Fill="White" Opacity="0"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="writer:BasicControlEditContainer">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="writer:BasicControlEditContainer">
                    <Grid x:Name="RootElement" Background="Beige">
                        <Canvas x:Name="ControlHost"/>
                        
                        <writer:AreaSelectControl x:Name="AreaSelect" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <!-- BasicEditor 기본 디자인 -->
    <Style TargetType="writer:BasicEditor">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="writer:BasicEditor">
                    <Grid x:Name="RootElement" Background="Blue">
                        <Border BorderBrush="Black" BorderThickness="2" UseLayoutRounding="True"/>

                        <Button Margin="-23,-23,0,0" x:Name="ConfigureButton"  VerticalAlignment="Top" HorizontalAlignment="Left" Content=" "></Button>

                        <Button x:Name="CloseButton" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,-23,-23,0" Content=" "/>
                        <writer:Adoner x:Name="WidthHeightAdoner" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,0,-23,-23" Content=" "/>
                        
                        <writer:Adoner x:Name="WidthAdoner" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,-23,-23" Content=" "/>

                        <writer:Adoner x:Name="HeightAdoner"  VerticalAlignment="Bottom" HorizontalAlignment="Center" Content=" "/>

                        <writer:Adoner x:Name="AngleAdoner" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="-23,0,0,-23" Content=" "/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>